var vm = new Vue({
    el:'#rrapp',
    data:{
        checkAgentForm:{},
        rules:{
            mobile: [
                { required: true, message: '代理商手机号必填', trigger: 'blur' },
            ],
            teamId: [
                { required: true, message: '二维码编码必填', trigger: 'blur' }
            ],
            verifyMobile: [
                { required: true, message: '业务员手机号必填', trigger: 'blur' }
            ]
        }
    },
    methods:{
        submitForm: function (formName) {
            this.$refs[formName].validate((valid) => {
                if (valid) {
                    $.ajax({
                        type: "POST",
                        url: "/userTeam/userteam/checkAgent",
                        contentType: "application/json",
                        data: JSON.stringify(vm.checkAgentForm),
                        success: function (r) {
                            alert(r.msg);
                        }
                    });
                } else {
                    this.$message({
                        message: '请按页面提示完善信息!',
                        type: 'warning'
                    });
                    return false;
                }
            });
        }
    },
});